package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class PrintOutTheElementsInListUsingForEach {
	public static void main(String[] args) {
		List<String> argList = new ArrayList<>();
		argList.add("1");
		argList.add("2");
		argList.add("3");
		argList.add("4");
		Collections.shuffle(argList);

		argList.stream().forEach(e -> System.out.format("%s ", e));

		for (String arg : argList) {
			System.out.format("%s ", arg);
		}

		System.out.println();
	}
}
